#ifndef CLIENT_H
#define CLIENT_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>
#include <stdbool.h>

#define SERVER_IP "192.168.2.87"
#define SERVER_PORT 60000
#define BUFFER_SIZE 1024
#define MAX_CLIENTS 10

typedef enum { STATE_UNREGISTERED, STATE_REGISTERED, STATE_LOGGED_IN } client_state;

void handle_error(const char *msg);
void *receive_messages(void *arg);
void show_prompt();
void register_user(int client_socket);
void login_user(int client_socket);
void send_broadcast(int client_socket, const char *message);
void send_private(int client_socket, int recipient_id, const char *message);
void show_help();

#endif